package com.cqhilink.iot.jobstandardmanagement.services.innerservice.impl.dic;

import com.cqhilink.iot.jobstandardmanagement.dao.mapper.DicMapper;
import com.cqhilink.iot.jobstandardmanagement.facade.model.Dic;
import com.cqhilink.iot.jobstandardmanagement.facade.service.dic.JsmDicService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by huangxueqian on 2017/4/28/028.
 */
public class JsmDicServiceImpl implements JsmDicService {
    @Autowired
    private DicMapper dicMapper;

    /**
     * @param dic 字典数据， 根据字典数据对象 查询对应的字典列表
     */
    @Override
    public List<Dic> getDicsByType(Dic dic) throws Exception {
        return dicMapper.getDicsByTypeList(dic);
    }

    /**
     * 查询Table的CODE和name集合，去重
     *
     * @param record
     * @return
     */
    @Override
    public List<Dic> selectByTableList(Dic record) {
        return dicMapper.selectByTableList(record);
    }

    /**
     * 根据table的Code查询type的code和name集合，去重
     *
     * @param record
     * @return
     */
    @Override
    public List<Dic> selectByTypeList(Dic record) {
        return dicMapper.selectByTypeList(record);
    }


}
